﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Chinesys.UI.WebService;

namespace Chinesys.UI.Helpers
{
    public static class DolarHelper
    {
        public static decimal GetDolarPrice()
        {
            decimal price;

            try
            {
                CurrencyConverter serviceProxy = new CurrencyConverter();
                CurrencyData data = serviceProxy.GetCurrencyData("USD", "ARS");
                price = Convert.ToDecimal(data.Rate);
            }
            catch
            {
                price = Convert.ToDecimal("3,95");
            }


            return price;
        }
    }
}